package cn.edu.zafu.bigdata.mahuilin;

// 父类 Vehicle
class Vehicle {
    // 父类的 move 方法
    public void move() {
        System.out.println("Vehicle is moving");
    }
}

// 子类 Car 继承自 Vehicle
class Car extends Vehicle {
    // 重写父类的 move 方法
    @Override
    public void move() {
        System.out.println("Car is moving");
    }
}

// 子类 Bicycle 继承自 Vehicle
class Bicycle extends Vehicle {
    // 重写父类的 move 方法
    @Override
    public void move() {
        System.out.println("Bicycle is moving");
    }
}

